<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import OnlineStatusEnum from '@/framework/constant/OnlineStatusEnum'
import CheckStatusEnum from '@/infra/constant/CheckStatusEnum'
import YesNoEnum from '@/infra/constant/YesNoEnum'
import { merchantApi } from '@/feature/mct/infra/api/merchantApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: merchantApi,
        showSelection: false,
        columns: [
          {
            label: '状态',
            searchable: true,
            type: ColumnType.RADIO,
            hiddenInForm: true,
            options: OnlineStatusEnum,
            prop: 'status'
          },
          {
            label: '标题',
            searchable: true,
            width: 300,
            required: true,
            prop: 'title'
          },
          {
            label: 'Logo',
            type: ColumnType.IMAGE,
            prop: 'avatar'
          },
          {
            label: '评分(最高5分)',
            width: 120,
            prop: 'score'
          },
          {
            label: '粉丝数',
            prop: 'fansNum',
            width: 100,
            type: ColumnType.NUMBER
          },
          {
            label: '审核状态',
            searchable: true,
            width: 100,
            type: ColumnType.SELECT,
            hiddenInForm: true,
            options: CheckStatusEnum,
            prop: 'checkStatus'
          },
          {
            label: '审核备注',
            prop: 'checkRemark'
          },
          {
            label: '是否自营店',
            prop: 'selfSupportFlag',
            type: ColumnType.RADIO,
            options: YesNoEnum
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
          // ,
          // {
          //   label: '是否前端显示',
          //   prop: 'showFlag',
          //   type: ColumnType.RADIO,
          //   options: YesNoEnum
          // }
        ]
      }
    }
  },
  methods: {}
}
</script>

